<template>
    <div class="da">
        <div class="header">
            <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" />
        </div>
        <ul>
        <li v-for="obj in list" :key="obj.id">
            <p><img :src="image" alt="" style="width: 100%;"></p>
            <p class="van-multi-ellipsis--l2">{{ obj.title }}</p>
            <p style="color: red;">￥{{ obj.price }}</p>
        </li>
    </ul>
        <div class="meddle">
            <van-action-bar>
                <van-action-bar-icon icon="chat-o" text="客服" @click="onClickIcon" />
                <van-action-bar-icon icon="cart-o" text="购物车" @click="onClickIcon" />
                <van-action-bar-icon icon="shop-o" text="店铺" @click="onClickIcon" />
                <van-action-bar-button type="danger" text="立即购买" @click="onClickButton" />
            </van-action-bar>
        </div>

    </div>
</template>
<script setup>
      import request from '@/utils/request.js'
    import {onMounted,ref} from 'vue'
    const list=ref([])
    onMounted(()=>{
        request.get('/detail',{
            params:{route:vlaue.id}
        }).then(res=>{
            if(res.data.code==200){
                obj.value=res.data.data
            }
        })
    })
</script>